import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  { path: '/login', component: () => import('@/views/login') },
  { path: '/reg', component: () => import('@/views/reg') },
  {
    path: '/',
    component: () => import('@/views/layout'),
    children: [
      { path: '/', component: () => import('@/views/home') },
      { path: 'artcategory', component: () => import('@/views/artcategory') },
      { path: 'artlist', component: () => import('@/views/artlist') }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
